package product.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import product.domain.Brand;
import product.service.CommonService;

import java.util.Collection;
import java.util.Map;
import java.util.function.Function;

public class CommonServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M, T> {

    private LambdaQueryWrapper<Brand> getQueryWrapper(Map<String, Object> params) {
        LambdaQueryWrapper<Brand> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(params.containsKey("key"), Brand::getBrandId, params.get("key"));
        return wrapper;
    }
}
